#include "abstract_factory.h"

#include <iostream>

AbstractFactory::AbstractFactory()
{}

AbstractFactory::~AbstractFactory()
{}

Factory1::Factory1()
{
	std::cout << "create Factory1 instance" << std::endl;
}

Factory1::~Factory1()
{
	std::cout << "release Factory1 instance" << std::endl;
}

AbstractProductA* Factory1::CreateProductA()
{
	return new ProductA_1();
}

AbstractProductB* Factory1::CreateProductB()
{
	return new ProductB_1();
}

Factory2::Factory2()
{
	std::cout << "create Factory2 instance" << std::endl;
}

Factory2::~Factory2()
{
	std::cout << "release Factory2 instance" << std::endl;
}

AbstractProductA* Factory2::CreateProductA()
{
	return new ProductA_2();
}

AbstractProductB* Factory2::CreateProductB()
{
	return new ProductB_2();
}